package test6;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2023-04-05
 * Time: 15:31
 */
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int num = scanner.nextInt();
            int size = 31;
            int count = 0;
            while (size-- != 0) {
                int temp = num & 1;
                if (temp == 1) {
                    count++;
                }
                num >>= 1;
            }
            System.out.println(count);
        }
    }
}